-- GENERATED SPELL FOR [Ashenvale Bear] --


function spell0_3809(pUnit, Event) --@Claw,n/a--
pUnit:FullCastSpellOnTarget(16829,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3809', 584, 1)
end

function spell1_3809(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(1753,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3809', 0, 1)
end

function spell2_3809(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(14917,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3809', 0, 1)
end

function spell3_3809(pUnit, Event) --@Swipe,n/a--
pUnit:FullCastSpellOnTarget(53526,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3809', 0, 1)
end

function Sorts_3809(pUnit, Event)
local choix_sorts_3809 = math.random(0, 3)
if choix_sorts_3809 == 0 then
pUnit:RegisterEvent('spell0_3809', 1, 1)
end
if choix_sorts_3809 == 1 then
pUnit:RegisterEvent('spell1_3809', 1, 1)
end
if choix_sorts_3809 == 2 then
pUnit:RegisterEvent('spell2_3809', 1, 1)
end
if choix_sorts_3809 == 3 then
pUnit:RegisterEvent('spell3_3809', 1, 1)
end
end

function mob3809_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3809', math.random(1500, 3000), 1)
end

function mob3809_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3809_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3809_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3809, 1, 'mob3809_Action')
RegisterUnitEvent(3809, 2, 'mob3809_Leave')
RegisterUnitEvent(3809, 3, 'mob3809_Kill')
RegisterUnitEvent(3809, 4, 'mob3809_Die')
